import click
from flask.cli import AppGroup

# 自定义命令,分组命令,使用user管理多个命令

user_cli = AppGroup("user")


@user_cli.command("print")  # 指定命令
@click.argument("name")  # 指定参数
def print_user(name):
    print("this is", name)


@user_cli.command("add")
@click.argument("num")
def add_num(num):
    print("result is", num+num)